home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / perl / mac-perl / gdbm15st.bin / gdbm / getopt.h < prev    next >
MacBinary  |  1992-04-05  |  4.0 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Apr 5 14:41:22 1992, modified Sun Apr 5 14:41:22 1992, creator 'MPS ', type ASCII, 3554 bytes "getopt.h" , at 0xe62 286 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 67 65 74 6f 70 74 | 2e 68 00 00 00 00 00 00 |..getopt|.h......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 0d e2 00 | 00 01 1e a6 04 fa 52 a6 |........|......R.|
|00000060| 04 fa 52 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..R.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 56 98 00 00 |........|....V...|
|00000080| 2f 2a 20 64 65 63 6c 61 | 72 61 74 69 6f 6e 73 20 |/* decla|rations |
|00000090| 66 6f 72 20 67 65 74 6f | 70 74 0d 20 20 20 43 6f |for geto|pt. Co|
|000000a0| 70 79 72 69 67 68 74 20 | 28 43 29 20 31 39 38 39 |pyright |(C) 1989|
|000000b0| 2c 20 31 39 39 30 20 46 | 72 65 65 20 53 6f 66 74 |, 1990 F|ree Soft|
|000000c0| 77 61 72 65 20 46 6f 75 | 6e 64 61 74 69 6f 6e 2c |ware Fou|ndation,|
|000000d0| 20 49 6e 63 2e 0d 0d 20 | 20 20 54 68 69 73 20 70 | Inc... | This p|
|000000e0| 72 6f 67 72 61 6d 20 69 | 73 20 66 72 65 65 20 73 |rogram i|s free s|
|000000f0| 6f 66 74 77 61 72 65 3b | 20 79 6f 75 20 63 61 6e |oftware;| you can|
|00000100| 20 72 65 64 69 73 74 72 | 69 62 75 74 65 20 69 74 | redistr|ibute it|
|00000110| 20 61 6e 64 2f 6f 72 20 | 6d 6f 64 69 66 79 0d 20 | and/or |modify. |
|00000120| 20 20 69 74 20 75 6e 64 | 65 72 20 74 68 65 20 74 | it und|er the t|
|00000130| 65 72 6d 73 20 6f 66 20 | 74 68 65 20 47 4e 55 20 |erms of |the GNU |
|00000140| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|00000150| 69 63 65 6e 73 65 20 61 | 73 20 70 75 62 6c 69 73 |icense a|s publis|
|00000160| 68 65 64 20 62 79 0d 20 | 20 20 74 68 65 20 46 72 |hed by. | the Fr|
|00000170| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|00000180| 64 61 74 69 6f 6e 3b 20 | 65 69 74 68 65 72 20 76 |dation; |either v|
|00000190| 65 72 73 69 6f 6e 20 31 | 2c 20 6f 72 20 28 61 74 |ersion 1|, or (at|
|000001a0| 20 79 6f 75 72 20 6f 70 | 74 69 6f 6e 29 0d 20 20 | your op|tion). |
|000001b0| 20 61 6e 79 20 6c 61 74 | 65 72 20 76 65 72 73 69 | any lat|er versi|
|000001c0| 6f 6e 2e 0d 0d 20 20 20 | 54 68 69 73 20 70 72 6f |on... |This pro|
|000001d0| 67 72 61 6d 20 69 73 20 | 64 69 73 74 72 69 62 75 |gram is |distribu|
|000001e0| 74 65 64 20 69 6e 20 74 | 68 65 20 68 6f 70 65 20 |ted in t|he hope |
|000001f0| 74 68 61 74 20 69 74 20 | 77 69 6c 6c 20 62 65 20 |that it |will be |
|00000200| 75 73 65 66 75 6c 2c 0d | 20 20 20 62 75 74 20 57 |useful,.| but W|
|00000210| 49 54 48 4f 55 54 20 41 | 4e 59 20 57 41 52 52 41 |ITHOUT A|NY WARRA|
|00000220| 4e 54 59 3b 20 77 69 74 | 68 6f 75 74 20 65 76 65 |NTY; wit|hout eve|
|00000230| 6e 20 74 68 65 20 69 6d | 70 6c 69 65 64 20 77 61 |n the im|plied wa|
|00000240| 72 72 61 6e 74 79 20 6f | 66 0d 20 20 20 4d 45 52 |rranty o|f. MER|
|00000250| 43 48 41 4e 54 41 42 49 | 4c 49 54 59 20 6f 72 20 |CHANTABI|LITY or |
|00000260| 46 49 54 4e 45 53 53 20 | 46 4f 52 20 41 20 50 41 |FITNESS |FOR A PA|
|00000270| 52 54 49 43 55 4c 41 52 | 20 50 55 52 50 4f 53 45 |RTICULAR| PURPOSE|
|00000280| 2e 20 20 53 65 65 20 74 | 68 65 0d 20 20 20 47 4e |. See t|he. GN|
|00000290| 55 20 47 65 6e 65 72 61 | 6c 20 50 75 62 6c 69 63 |U Genera|l Public|
|000002a0| 20 4c 69 63 65 6e 73 65 | 20 66 6f 72 20 6d 6f 72 | License| for mor|
|000002b0| 65 20 64 65 74 61 69 6c | 73 2e 0d 0d 20 20 20 59 |e detail|s... Y|
|000002c0| 6f 75 20 73 68 6f 75 6c | 64 20 68 61 76 65 20 72 |ou shoul|d have r|
|000002d0| 65 63 65 69 76 65 64 20 | 61 20 63 6f 70 79 20 6f |eceived |a copy o|
|000002e0| 66 20 74 68 65 20 47 4e | 55 20 47 65 6e 65 72 61 |f the GN|U Genera|
|000002f0| 6c 20 50 75 62 6c 69 63 | 20 4c 69 63 65 6e 73 65 |l Public| License|
|00000300| 0d 20 20 20 61 6c 6f 6e | 67 20 77 69 74 68 20 74 |. alon|g with t|
|00000310| 68 69 73 20 70 72 6f 67 | 72 61 6d 3b 20 69 66 20 |his prog|ram; if |
|00000320| 6e 6f 74 2c 20 77 72 69 | 74 65 20 74 6f 20 74 68 |not, wri|te to th|
|00000330| 65 20 46 72 65 65 20 53 | 6f 66 74 77 61 72 65 0d |e Free S|oftware.|
|00000340| 20 20 20 46 6f 75 6e 64 | 61 74 69 6f 6e 2c 20 49 | Found|ation, I|
|00000350| 6e 63 2e 2c 20 36 37 35 | 20 4d 61 73 73 20 41 76 |nc., 675| Mass Av|
|00000360| 65 2c 20 43 61 6d 62 72 | 69 64 67 65 2c 20 4d 41 |e, Cambr|idge, MA|
|00000370| 20 30 32 31 33 39 2c 20 | 55 53 41 2e 20 20 2a 2f | 02139, |USA. */|
|00000380| 0d 0d 2f 2a 20 46 6f 72 | 20 63 6f 6d 6d 75 6e 69 |../* For| communi|
|00000390| 63 61 74 69 6f 6e 20 66 | 72 6f 6d 20 60 67 65 74 |cation f|rom `get|
|000003a0| 6f 70 74 27 20 74 6f 20 | 74 68 65 20 63 61 6c 6c |opt' to |the call|
|000003b0| 65 72 2e 0d 20 20 20 57 | 68 65 6e 20 60 67 65 74 |er.. W|hen `get|
|000003c0| 6f 70 74 27 20 66 69 6e | 64 73 20 61 6e 20 6f 70 |opt' fin|ds an op|
|000003d0| 74 69 6f 6e 20 74 68 61 | 74 20 74 61 6b 65 73 20 |tion tha|t takes |
|000003e0| 61 6e 20 61 72 67 75 6d | 65 6e 74 2c 0d 20 20 20 |an argum|ent,. |
|000003f0| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 20 76 61 6c |the argu|ment val|
|00000400| 75 65 20 69 73 20 72 65 | 74 75 72 6e 65 64 20 68 |ue is re|turned h|
|00000410| 65 72 65 2e 0d 20 20 20 | 41 6c 73 6f 2c 20 77 68 |ere.. |Also, wh|
|00000420| 65 6e 20 60 6f 72 64 65 | 72 69 6e 67 27 20 69 73 |en `orde|ring' is|
|00000430| 20 52 45 54 55 52 4e 5f | 49 4e 5f 4f 52 44 45 52 | RETURN_|IN_ORDER|
|00000440| 2c 0d 20 20 20 65 61 63 | 68 20 6e 6f 6e 2d 6f 70 |,. eac|h non-op|
|00000450| 74 69 6f 6e 20 41 52 47 | 56 2d 65 6c 65 6d 65 6e |tion ARG|V-elemen|
|00000460| 74 20 69 73 20 72 65 74 | 75 72 6e 65 64 20 68 65 |t is ret|urned he|
|00000470| 72 65 2e 20 20 2a 2f 0d | 0d 65 78 74 65 72 6e 20 |re. */.|.extern |
|00000480| 63 68 61 72 20 2a 6f 70 | 74 61 72 67 3b 0d 0d 2f |char *op|targ;../|
|00000490| 2a 20 49 6e 64 65 78 20 | 69 6e 20 41 52 47 56 20 |* Index |in ARGV |
|000004a0| 6f 66 20 74 68 65 20 6e | 65 78 74 20 65 6c 65 6d |of the n|ext elem|
|000004b0| 65 6e 74 20 74 6f 20 62 | 65 20 73 63 61 6e 6e 65 |ent to b|e scanne|
|000004c0| 64 2e 0d 20 20 20 54 68 | 69 73 20 69 73 20 75 73 |d.. Th|is is us|
|000004d0| 65 64 20 66 6f 72 20 63 | 6f 6d 6d 75 6e 69 63 61 |ed for c|ommunica|
|000004e0| 74 69 6f 6e 20 74 6f 20 | 61 6e 64 20 66 72 6f 6d |tion to |and from|
|000004f0| 20 74 68 65 20 63 61 6c | 6c 65 72 0d 20 20 20 61 | the cal|ler. a|
|00000500| 6e 64 20 66 6f 72 20 63 | 6f 6d 6d 75 6e 69 63 61 |nd for c|ommunica|
|00000510| 74 69 6f 6e 20 62 65 74 | 77 65 65 6e 20 73 75 63 |tion bet|ween suc|
|00000520| 63 65 73 73 69 76 65 20 | 63 61 6c 6c 73 20 74 6f |cessive |calls to|
|00000530| 20 60 67 65 74 6f 70 74 | 27 2e 0d 0d 20 20 20 4f | `getopt|'... O|
|00000540| 6e 20 65 6e 74 72 79 20 | 74 6f 20 60 67 65 74 6f |n entry |to `geto|
|00000550| 70 74 27 2c 20 7a 65 72 | 6f 20 6d 65 61 6e 73 20 |pt', zer|o means |
|00000560| 74 68 69 73 20 69 73 20 | 74 68 65 20 66 69 72 73 |this is |the firs|
|00000570| 74 20 63 61 6c 6c 3b 20 | 69 6e 69 74 69 61 6c 69 |t call; |initiali|
|00000580| 7a 65 2e 0d 0d 20 20 20 | 57 68 65 6e 20 60 67 65 |ze... |When `ge|
|00000590| 74 6f 70 74 27 20 72 65 | 74 75 72 6e 73 20 45 4f |topt' re|turns EO|
|000005a0| 46 2c 20 74 68 69 73 20 | 69 73 20 74 68 65 20 69 |F, this |is the i|
|000005b0| 6e 64 65 78 20 6f 66 20 | 74 68 65 20 66 69 72 73 |ndex of |the firs|
|000005c0| 74 20 6f 66 20 74 68 65 | 0d 20 20 20 6e 6f 6e 2d |t of the|. non-|
|000005d0| 6f 70 74 69 6f 6e 20 65 | 6c 65 6d 65 6e 74 73 20 |option e|lements |
|000005e0| 74 68 61 74 20 74 68 65 | 20 63 61 6c 6c 65 72 20 |that the| caller |
|000005f0| 73 68 6f 75 6c 64 20 69 | 74 73 65 6c 66 20 73 63 |should i|tself sc|
|00000600| 61 6e 2e 0d 0d 20 20 20 | 4f 74 68 65 72 77 69 73 |an... |Otherwis|
|00000610| 65 2c 20 60 6f 70 74 69 | 6e 64 27 20 63 6f 6d 6d |e, `opti|nd' comm|
|00000620| 75 6e 69 63 61 74 65 73 | 20 66 72 6f 6d 20 6f 6e |unicates| from on|
|00000630| 65 20 63 61 6c 6c 20 74 | 6f 20 74 68 65 20 6e 65 |e call t|o the ne|
|00000640| 78 74 0d 20 20 20 68 6f | 77 20 6d 75 63 68 20 6f |xt. ho|w much o|
|00000650| 66 20 41 52 47 56 20 68 | 61 73 20 62 65 65 6e 20 |f ARGV h|as been |
|00000660| 73 63 61 6e 6e 65 64 20 | 73 6f 20 66 61 72 2e 20 |scanned |so far. |
|00000670| 20 2a 2f 0d 0d 65 78 74 | 65 72 6e 20 69 6e 74 20 | */..ext|ern int |
|00000680| 6f 70 74 69 6e 64 3b 0d | 0d 2f 2a 20 43 61 6c 6c |optind;.|./* Call|
|00000690| 65 72 73 20 73 74 6f 72 | 65 20 7a 65 72 6f 20 68 |ers stor|e zero h|
|000006a0| 65 72 65 20 74 6f 20 69 | 6e 68 69 62 69 74 20 74 |ere to i|nhibit t|
|000006b0| 68 65 20 65 72 72 6f 72 | 20 6d 65 73 73 61 67 65 |he error| message|
|000006c0| 20 60 67 65 74 6f 70 74 | 27 20 70 72 69 6e 74 73 | `getopt|' prints|
|000006d0| 0d 20 20 20 66 6f 72 20 | 75 6e 72 65 63 6f 67 6e |. for |unrecogn|
|000006e0| 69 7a 65 64 20 6f 70 74 | 69 6f 6e 73 2e 20 20 2a |ized opt|ions. *|
|000006f0| 2f 0d 0d 65 78 74 65 72 | 6e 20 69 6e 74 20 6f 70 |/..exter|n int op|
|00000700| 74 65 72 72 3b 0d 0d 2f | 2a 20 44 65 73 63 72 69 |terr;../|* Descri|
|00000710| 62 65 20 74 68 65 20 6c | 6f 6e 67 2d 6e 61 6d 65 |be the l|ong-name|
|00000720| 64 20 6f 70 74 69 6f 6e | 73 20 72 65 71 75 65 73 |d option|s reques|
|00000730| 74 65 64 20 62 79 20 74 | 68 65 20 61 70 70 6c 69 |ted by t|he appli|
|00000740| 63 61 74 69 6f 6e 2e 0d | 20 20 20 5f 47 45 54 4f |cation..| _GETO|
|00000750| 50 54 5f 4c 4f 4e 47 5f | 4f 50 54 49 4f 4e 53 20 |PT_LONG_|OPTIONS |
|00000760| 69 73 20 61 20 76 65 63 | 74 6f 72 20 6f 66 20 60 |is a vec|tor of `|
|00000770| 73 74 72 75 63 74 20 6f | 70 74 69 6f 6e 27 20 74 |struct o|ption' t|
|00000780| 65 72 6d 69 6e 61 74 65 | 64 20 62 79 20 61 6e 0d |erminate|d by an.|
|00000790| 20 20 20 65 6c 65 6d 65 | 6e 74 20 63 6f 6e 74 61 | eleme|nt conta|
|000007a0| 69 6e 69 6e 67 20 61 20 | 6e 61 6d 65 20 77 68 69 |ining a |name whi|
|000007b0| 63 68 20 69 73 20 7a 65 | 72 6f 2e 0d 0d 20 20 20 |ch is ze|ro... |
|000007c0| 54 68 65 20 66 69 65 6c | 64 20 60 68 61 73 5f 61 |The fiel|d `has_a|
|000007d0| 72 67 27 20 69 73 3a 0d | 20 20 20 30 20 69 66 20 |rg' is:.| 0 if |
|000007e0| 74 68 65 20 6f 70 74 69 | 6f 6e 20 64 6f 65 73 20 |the opti|on does |
|000007f0| 6e 6f 74 20 74 61 6b 65 | 20 61 6e 20 61 72 67 75 |not take| an argu|
|00000800| 6d 65 6e 74 2c 0d 20 20 | 20 31 20 69 66 20 74 68 |ment,. | 1 if th|
|00000810| 65 20 6f 70 74 69 6f 6e | 20 72 65 71 75 69 72 65 |e option| require|
|00000820| 73 20 61 6e 20 61 72 67 | 75 6d 65 6e 74 2c 0d 20 |s an arg|ument,. |
|00000830| 20 20 32 20 69 66 20 74 | 68 65 20 6f 70 74 69 6f | 2 if t|he optio|
|00000840| 6e 20 74 61 6b 65 73 20 | 61 6e 20 6f 70 74 69 6f |n takes |an optio|
|00000850| 6e 61 6c 20 61 72 67 75 | 6d 65 6e 74 2e 0d 0d 20 |nal argu|ment... |
|00000860| 20 20 49 66 20 74 68 65 | 20 66 69 65 6c 64 20 60 | If the| field `|
|00000870| 66 6c 61 67 27 20 69 73 | 20 6e 6f 6e 7a 65 72 6f |flag' is| nonzero|
|00000880| 2c 20 69 74 20 70 6f 69 | 6e 74 73 20 74 6f 20 61 |, it poi|nts to a|
|00000890| 20 76 61 72 69 61 62 6c | 65 20 74 68 61 74 20 69 | variabl|e that i|
|000008a0| 73 20 73 65 74 0d 20 20 | 20 74 6f 20 74 68 65 20 |s set. | to the |
|000008b0| 76 61 6c 75 65 20 67 69 | 76 65 6e 20 69 6e 20 74 |value gi|ven in t|
|000008c0| 68 65 20 66 69 65 6c 64 | 20 60 76 61 6c 27 20 77 |he field| `val' w|
|000008d0| 68 65 6e 20 74 68 65 20 | 6f 70 74 69 6f 6e 20 69 |hen the |option i|
|000008e0| 73 20 66 6f 75 6e 64 2c | 20 62 75 74 0d 20 20 20 |s found,| but. |
|000008f0| 6c 65 66 74 20 75 6e 63 | 68 61 6e 67 65 64 20 69 |left unc|hanged i|
|00000900| 66 20 74 68 65 20 6f 70 | 74 69 6f 6e 20 69 73 20 |f the op|tion is |
|00000910| 6e 6f 74 20 66 6f 75 6e | 64 2e 0d 0d 20 20 20 54 |not foun|d... T|
|00000920| 6f 20 68 61 76 65 20 61 | 20 6c 6f 6e 67 2d 6e 61 |o have a| long-na|
|00000930| 6d 65 64 20 6f 70 74 69 | 6f 6e 20 64 6f 20 73 6f |med opti|on do so|
|00000940| 6d 65 74 68 69 6e 67 20 | 6f 74 68 65 72 20 74 68 |mething |other th|
|00000950| 61 6e 20 73 65 74 20 61 | 6e 20 60 69 6e 74 27 20 |an set a|n `int' |
|00000960| 74 6f 0d 20 20 20 61 20 | 63 6f 6d 70 69 6c 65 64 |to. a |compiled|
|00000970| 2d 69 6e 20 63 6f 6e 73 | 74 61 6e 74 2c 20 73 75 |-in cons|tant, su|
|00000980| 63 68 20 61 73 20 73 65 | 74 20 61 20 76 61 6c 75 |ch as se|t a valu|
|00000990| 65 20 66 72 6f 6d 20 60 | 6f 70 74 61 72 67 27 2c |e from `|optarg',|
|000009a0| 20 73 65 74 20 74 68 65 | 0d 20 20 20 6f 70 74 69 | set the|. opti|
|000009b0| 6f 6e 27 73 20 60 66 6c | 61 67 27 20 66 69 65 6c |on's `fl|ag' fiel|
|000009c0| 64 20 74 6f 20 7a 65 72 | 6f 20 61 6e 64 20 69 74 |d to zer|o and it|
|000009d0| 73 20 60 76 61 6c 27 20 | 66 69 65 6c 64 20 74 6f |s `val' |field to|
|000009e0| 20 61 20 6e 6f 6e 7a 65 | 72 6f 0d 20 20 20 76 61 | a nonze|ro. va|
|000009f0| 6c 75 65 20 28 74 68 65 | 20 65 71 75 69 76 61 6c |lue (the| equival|
|00000a00| 65 6e 74 20 73 69 6e 67 | 6c 65 2d 6c 65 74 74 65 |ent sing|le-lette|
|00000a10| 72 20 6f 70 74 69 6f 6e | 20 63 68 61 72 61 63 74 |r option| charact|
|00000a20| 65 72 2c 20 69 66 20 74 | 68 65 72 65 20 69 73 0d |er, if t|here is.|
|00000a30| 20 20 20 6f 6e 65 29 2e | 20 20 46 6f 72 20 6c 6f | one).| For lo|
|00000a40| 6e 67 20 6f 70 74 69 6f | 6e 73 20 74 68 61 74 20 |ng optio|ns that |
|00000a50| 68 61 76 65 20 61 20 7a | 65 72 6f 20 60 66 6c 61 |have a z|ero `fla|
|00000a60| 67 27 20 66 69 65 6c 64 | 2c 20 60 67 65 74 6f 70 |g' field|, `getop|
|00000a70| 74 27 0d 20 20 20 72 65 | 74 75 72 6e 73 20 74 68 |t'. re|turns th|
|00000a80| 65 20 63 6f 6e 74 65 6e | 74 73 20 6f 66 20 74 68 |e conten|ts of th|
|00000a90| 65 20 60 76 61 6c 27 20 | 66 69 65 6c 64 2e 20 20 |e `val' |field. |
|00000aa0| 2a 2f 0d 0d 73 74 72 75 | 63 74 20 6f 70 74 69 6f |*/..stru|ct optio|
|00000ab0| 6e 0d 7b 0d 20 20 63 68 | 61 72 20 2a 6e 61 6d 65 |n.{. ch|ar *name|
|00000ac0| 3b 0d 20 20 69 6e 74 20 | 68 61 73 5f 61 72 67 3b |;. int |has_arg;|
|00000ad0| 0d 20 20 69 6e 74 20 2a | 66 6c 61 67 3b 0d 20 20 |. int *|flag;. |
|00000ae0| 69 6e 74 20 76 61 6c 3b | 0d 7d 3b 0d 0d 23 69 66 |int val;|.};..#if|
|00000af0| 64 65 66 20 5f 5f 53 54 | 44 43 5f 5f 0d 65 78 74 |def __ST|DC__.ext|
|00000b00| 65 72 6e 20 63 6f 6e 73 | 74 20 73 74 72 75 63 74 |ern cons|t struct|
|00000b10| 20 6f 70 74 69 6f 6e 20 | 2a 5f 67 65 74 6f 70 74 | option |*_getopt|
|00000b20| 5f 6c 6f 6e 67 5f 6f 70 | 74 69 6f 6e 73 3b 0d 23 |_long_op|tions;.#|
|00000b30| 65 6c 73 65 0d 65 78 74 | 65 72 6e 20 73 74 72 75 |else.ext|ern stru|
|00000b40| 63 74 20 6f 70 74 69 6f | 6e 20 2a 5f 67 65 74 6f |ct optio|n *_geto|
|00000b50| 70 74 5f 6c 6f 6e 67 5f | 6f 70 74 69 6f 6e 73 3b |pt_long_|options;|
|00000b60| 0d 23 65 6e 64 69 66 0d | 0d 2f 2a 20 49 66 20 6e |.#endif.|./* If n|
|00000b70| 6f 6e 7a 65 72 6f 2c 20 | 27 2d 27 20 63 61 6e 20 |onzero, |'-' can |
|00000b80| 69 6e 74 72 6f 64 75 63 | 65 20 6c 6f 6e 67 2d 6e |introduc|e long-n|
|00000b90| 61 6d 65 64 20 6f 70 74 | 69 6f 6e 73 2e 0d 20 20 |amed opt|ions.. |
|00000ba0| 20 53 65 74 20 62 79 20 | 67 65 74 6f 70 74 5f 6c | Set by |getopt_l|
|00000bb0| 6f 6e 67 5f 6f 6e 6c 79 | 2e 20 20 2a 2f 0d 0d 65 |ong_only|. */..e|
|00000bc0| 78 74 65 72 6e 20 69 6e | 74 20 5f 67 65 74 6f 70 |xtern in|t _getop|
|00000bd0| 74 5f 6c 6f 6e 67 5f 6f | 6e 6c 79 3b 0d 0d 2f 2a |t_long_o|nly;../*|
|00000be0| 20 54 68 65 20 69 6e 64 | 65 78 20 69 6e 20 47 45 | The ind|ex in GE|
|00000bf0| 54 4f 50 54 5f 4c 4f 4e | 47 5f 4f 50 54 49 4f 4e |TOPT_LON|G_OPTION|
|00000c00| 53 20 6f 66 20 74 68 65 | 20 6c 6f 6e 67 2d 6e 61 |S of the| long-na|
|00000c10| 6d 65 64 20 6f 70 74 69 | 6f 6e 20 66 6f 75 6e 64 |med opti|on found|
|00000c20| 2e 0d 20 20 20 4f 6e 6c | 79 20 76 61 6c 69 64 20 |.. Onl|y valid |
|00000c30| 77 68 65 6e 20 61 20 6c | 6f 6e 67 2d 6e 61 6d 65 |when a l|ong-name|
|00000c40| 64 20 6f 70 74 69 6f 6e | 20 68 61 73 20 62 65 65 |d option| has bee|
|00000c50| 6e 20 66 6f 75 6e 64 20 | 62 79 20 74 68 65 20 6d |n found |by the m|
|00000c60| 6f 73 74 0d 20 20 20 72 | 65 63 65 6e 74 20 63 61 |ost. r|ecent ca|
|00000c70| 6c 6c 20 74 6f 20 60 67 | 65 74 6f 70 74 27 2e 20 |ll to `g|etopt'. |
|00000c80| 20 2a 2f 0d 0d 65 78 74 | 65 72 6e 20 69 6e 74 20 | */..ext|ern int |
|00000c90| 6f 70 74 69 6f 6e 5f 69 | 6e 64 65 78 3b 0d 0d 23 |option_i|ndex;..#|
|00000ca0| 69 66 64 65 66 20 5f 5f | 53 54 44 43 5f 5f 0d 69 |ifdef __|STDC__.i|
|00000cb0| 6e 74 20 67 65 74 6f 70 | 74 20 28 69 6e 74 20 61 |nt getop|t (int a|
|00000cc0| 72 67 63 2c 20 63 68 61 | 72 20 2a 2a 61 72 67 76 |rgc, cha|r **argv|
|00000cd0| 2c 20 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 73 68 |, const |char *sh|
|00000ce0| 6f 72 74 6f 70 74 73 29 | 3b 0d 69 6e 74 20 67 65 |ortopts)|;.int ge|
|00000cf0| 74 6f 70 74 5f 6c 6f 6e | 67 20 28 69 6e 74 20 61 |topt_lon|g (int a|
|00000d00| 72 67 63 2c 20 63 68 61 | 72 20 2a 2a 61 72 67 76 |rgc, cha|r **argv|
|00000d10| 2c 20 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 73 68 |, const |char *sh|
|00000d20| 6f 72 74 6f 70 74 73 2c | 0d 09 09 20 63 6f 6e 73 |ortopts,|... cons|
|00000d30| 74 20 73 74 72 75 63 74 | 20 6f 70 74 69 6f 6e 20 |t struct| option |
|00000d40| 2a 6c 6f 6e 67 6f 70 74 | 73 2c 20 69 6e 74 20 2a |*longopt|s, int *|
|00000d50| 6c 6f 6e 67 69 6e 64 29 | 3b 0d 69 6e 74 20 67 65 |longind)|;.int ge|
|00000d60| 74 6f 70 74 5f 6c 6f 6e | 67 5f 6f 6e 6c 79 20 28 |topt_lon|g_only (|
|00000d70| 69 6e 74 20 61 72 67 63 | 2c 20 63 68 61 72 20 2a |int argc|, char *|
|00000d80| 2a 61 72 67 76 2c 20 63 | 6f 6e 73 74 20 63 68 61 |*argv, c|onst cha|
|00000d90| 72 20 2a 73 68 6f 72 74 | 6f 70 74 73 2c 0d 09 09 |r *short|opts,...|
|00000da0| 20 20 20 20 20 20 63 6f | 6e 73 74 20 73 74 72 75 | co|nst stru|
|00000db0| 63 74 20 6f 70 74 69 6f | 6e 20 2a 6c 6f 6e 67 6f |ct optio|n *longo|
|00000dc0| 70 74 73 2c 20 69 6e 74 | 20 2a 6c 6f 6e 67 69 6e |pts, int| *longin|
|00000dd0| 64 29 3b 0d 76 6f 69 64 | 20 65 6e 76 6f 70 74 28 |d);.void| envopt(|
|00000de0| 69 6e 74 20 2a 70 61 72 | 67 63 2c 20 63 68 61 72 |int *par|gc, char|
|00000df0| 20 2a 2a 2a 70 61 72 67 | 76 2c 20 63 68 61 72 20 | ***parg|v, char |
|00000e00| 2a 6f 70 74 73 74 72 29 | 3b 0d 23 65 6c 73 65 0d |*optstr)|;.#else.|
|00000e10| 69 6e 74 20 67 65 74 6f | 70 74 20 28 29 3b 0d 69 |int geto|pt ();.i|
|00000e20| 6e 74 20 67 65 74 6f 70 | 74 5f 6c 6f 6e 67 20 28 |nt getop|t_long (|
|00000e30| 29 3b 0d 69 6e 74 20 67 | 65 74 6f 70 74 5f 6c 6f |);.int g|etopt_lo|
|00000e40| 6e 67 5f 6f 6e 6c 79 20 | 28 29 3b 0d 76 6f 69 64 |ng_only |();.void|
|00000e50| 20 65 6e 76 6f 70 74 28 | 29 3b 0d 23 65 6e 64 69 | envopt(|);.#endi|
|00000e60| 66 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |f.......|........|
|00000e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e80| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000e90| 00 00 5d 82 00 00 00 00 | 00 00 00 00 00 00 00 00 |..].....|........|
|00000ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000eb0| 08 67 65 74 6f 70 74 2e | 68 00 02 00 00 00 00 00 |.getopt.|h.......|
|00000ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 a6 ea ac fd 00 00 | 0d e2 00 00 01 1e 00 00 |........|........|
|00000f00| 00 00 00 00 00 00 00 00 | 00 00 09 50 25 00 00 00 |........|...P%...|
|00000f10| 5d 82 13 4d 61 63 41 70 | 70 34 31 31 50 61 73 63 |]..MacAp|p411Pasc|
|00000f20| 61 6c 48 65 6c 70 00 00 | 00 00 00 00 00 00 00 00 |alHelp..|........|
|00000f30| 00 00 00 00 05 2a 25 00 | 00 00 5d 82 07 4d 50 57 |.....*%.|..]..MPW|
|00000f40| 48 65 6c 70 00 00 00 00 | 00 00 00 00 00 00 00 00 |Help....|........|
|00000f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 05 2b |........|.......+|
|00000f60| 25 00 00 00 5d 82 15 50 | 49 6e 74 65 72 66 61 63 |%...]..P|Interfac|
|00000f70| 65 73 48 65 6c 70 2e 69 | 6e 64 65 78 00 00 00 00 |esHelp.i|ndex....|
|00000f80| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00000f90| 00 00 00 00 00 00 00 00 | 00 1c 00 1e ff ff 00 00 |........|........|
|00000fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+